﻿@model IEnumerable<ProjectBordspil.Models.ActiveGames>

@{
    ViewBag.Title = "ActiveGames";
}

<h2 class="InfoHeader">Virk spil</h2>

<div class="ActiveGroup1">
    <h2 class="H2Score">Samstæðuleikur</h2>
        <table>
            <tbody>
                <tr >
                    <th class="ActiveHead">Nafn á leik</th>
                    <th class="ActiveHead">Borðspil</th>
                    <th class="ActiveHead" >Fj. leikmanna</th>
                    <th class="ActiveHead" >Leikmaður 1 </th>
                    <th class="ActiveHead" >Leikmaður 2 </th>
                </tr>
                @foreach (var game in Model)
                {
                    if (game.typeOfGame == "Memory Game" && !game.finished)    
                    {    
                        <tr  class="GameNr">
                            <td class="ActionLinkCss">@Html.ActionLink(game.name, "ShowMemGame", "Game", new { id = game.id }, null)</td>
                            <td>@game.typeOfGame</td>
                            <td>@game.NumberOfPlayers</td>
                            <td>@game.user1</td>
                            <td>@game.user2</td>
                        </tr>
                    }
                }
            </tbody>
        </table>
</div>
<div class="ActiveGroup2">
    <h2 class="H2Score">Höggstokkurinn</h2>
        <table>
            <tbody>
                <tr >
                    <th class="ActiveHead">Nafn á leik</th>
                    <th class="ActiveHead">Borðspil</th>
                    <th class="ActiveHead" >Fj. leikmanna</th>
                    <th class="ActiveHead" >Leikmaður 1 </th>
                    <th class="ActiveHead" >Leikmaður 2 </th>
                </tr>
                @foreach (var game in Model)
                {
                    if (game.typeOfGame == "Guillontine" && !game.finished)
                    {
                        <tr  class="GameNr">
                            <td class="ActionLinkCss">@Html.ActionLink(game.name, "ShowGuiGame", "Game", new { id = game.id }, null)</td>
                            <td>@game.typeOfGame</td>
                            <td>@game.NumberOfPlayers</td>
                            <td>@game.user1</td>
                            <td>@game.user2</td>
                        </tr>
                    }
                }
            </tbody>
        </table>
</div>

